var arr = [undefined,NaN,1,4,'7',[2,[9]],'那就成绩单'];
function fn(arr)
{
    let temp = [];
    var arr1 = arr.map(function(item,index)
    {
        if(Array.isArray(item))
        {
            fn(item);
        }
        else if(isNaN(item))
        {
            let num = Number(item);
            if(isNaN(num))
            {
                num = 0;
                temp.push(num);
            }
            else
            {
                temp.push(num);
            }
        }
        else
        {
            let num = Number(item);
            temp.push(num);
        }
    })
    console.log(temp);
    return arr1;
}
var arr2 = new fn(arr);